<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet"/>
<link href="assets/css/front/listCommonStyle.css" rel="stylesheet"/>
<link href="assets/css/modify.css" rel="stylesheet"/>
<script src="assets/js/select2/select2.js"></script>
<script src="assets/js/highcharts/highcharts.js"></script>
<style>
    .attendance {
        overflow: hidden;
        position: relative;
    }

    .attendance_page {
        position: absolute;
        top: 175px;
        left: 700px;
    }

    .page_up,
    .page_dowm {
        width: 34px;
        height: 34px;
        border-radius: 34px;
    }

    .page_up {
        background: url("assets/img/front/u188.png") no-repeat;
        background-size: 100% 100%;
    }

    .page_dowm {
        background: url("assets/img/front/u190.png") no-repeat;
        background-size: 100% 100%;
    }


    .information_list {
        width: 175px;
        height: 180px;
        margin-right: 12px;
        background-color: #fff;
        padding: 30px 0;
        box-shadow: 0px 0px 10px rgba(122, 161, 184, 0.3);
        text-align: center;
    }

    .information_work {
        width: 200px;
        height: 250px;
        margin-right: 20px;
        margin-bottom: 20px;
        background-color: #fff;
        padding: 10px 0;
        box-shadow: 0px 0px 10px rgba(122, 161, 184, 0.3);
        text-align: center;
        overflow: hidden;
    }

    .information_work-total {
        width: 199px;
        height: 250px;
        margin-right: 20px;
        margin-bottom: 20px;
        background-color: #15a4fa;
        padding: 10px 0;
        box-shadow: 0px 0px 10px rgba(122, 161, 184, 0.3);
        text-align: center;
        overflow: hidden;
    }

    .addMemberIcon {
        display: inline-block;
        width: 38px;
        height: 32px;
        background: url("assets/img/nav-img/icon_01.png");
    }

    .addContinueIcon {
        display: inline-block;
        width: 28px;
        height: 33px;
        background: url("assets/img/nav-img/icon_02.png");
    }

    .addTransitIcon {
        display: inline-block;
        width: 48px;
        height: 30px;
        background: url("assets/img/nav-img/icon_03.png");
    }

    .continueTransitIcon {
        display: inline-block;
        width: 52px;
        height: 33px;
        background: url("assets/img/nav-img/icon_04.png");
    }

    .incomeIcon {
        display: inline-block;
        width: 32px;
        height: 30px;
        background: url("assets/img/nav-img/icon_05.png");
    }

    .premiumIcon {
        display: inline-block;
        width: 31px;
        height: 28px;
        background: url("assets/img/nav-img/icon_06.png");
    }

    .liabilitiesIcon {
        display: inline-block;
        width: 27px;
        height: 30px;
        background: url("assets/img/nav-img/icon_07.png");
    }

    p {
        margin: 0px !important;
        height: 40px;
        line-height: 40px;
    }

    .information_work p {
        margin: 0px !important;
        height: 30px;
        line-height: 30px;
    }

    .btn-infoWork {
        color: #fff;
        border-radius: 5px !important;
    }

    .btn-transitinfoWork {
        color: #fff;
        border-radius: 5px !important;
    }

    /*.btn-infoWork:hover {*/
    /*background-color: #FF80A9 !important;*/
    /*border-color: #FF80A9 !important;*/
    /*color: #fff;*/
    /*border-radius: 5px !important;*/
    /*}*/

    /*.btn-infoWork:focus {*/
    /*background-color: #FF80A9 !important;*/
    /*border-color: #FF80A9 !important;*/
    /*color: #fff;*/
    /*border-radius: 5px !important;*/
    /*}*/
</style>
</head>
<div class="row margin-left-10">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div style="margin-bottom: 50px;clear: both;">
            <div class="widget flat margin-top-0" style="margin: 0px 0 0px 0!important;float: left">
                <div class="widget-header bordered-sky theme-bordered nopadding">
                    <div class="widget-buttons widget-label nomargin-bottom">
                        <label class="businessBtns">
                            <a type="btn" class="btn informationshow" value="0" onclick="informationChangeShow(this)"
                               style="background-color: #23a8f5;border: none;border-top-left-radius: 4px!important;border-bottom-left-radius: 4px!important;width: 120px;color: #fff;margin-right: 0!important;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">
                                今日数据<span id="nowTimeMes"></span>
                            </a><a type="btn" class="btn informationhidden" value="1"
                                   onclick="informationChangeShow(this)"
                                   style="border: none;border-top-right-radius: 4px!important;border-bottom-right-radius: 4px!important;width: 120px;color: #4a647d;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">本月数据
                        </a>
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 margin-bottom-30 todayInformation ">
        <label class="information_list ">
            <p><span class="addMemberIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">新增亲子会员</p>
            <p style="font-size: 30px;color: #ff80a9;font-weight: 600">

                <#list todayStudentMap as data >
                    <#if data.type == 1>
                        <#if data.applyStatus == 0>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="addContinueIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">续报亲子会员</p>
            <p style="font-size: 30px;color: #ff80a9;font-weight: 600">

                <#list todayStudentMap as data >
                    <#if data.type == 1>
                        <#if data.applyStatus == 1>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="addTransitIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">新增过渡会员</p>
            <p style="font-size: 30px;color: #a4fa;font-weight: 600">

                <#list todayStudentMap as data >
                    <#if data.type == 2>
                        <#if data.applyStatus == 0>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="continueTransitIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">续报过渡会员</p>
            <p style="font-size: 30px;color: #a4fa;font-weight: 600">

                <#list todayStudentMap as data >
                    <#if data.type == 2>
                        <#if data.applyStatus == 1>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="incomeIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">收付收入</p>
            <p style="font-size: 30px;color: #b393e7;font-weight: 600">
                <span class="information_number">${todayPaymentMap.sumAmount}</span>
            </p>
        </label>
        <label class="information_list">
            <p><span class="premiumIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">退费支出</p>
            <p style="font-size: 30px;color: #6cbd6d;font-weight: 600">
                <span class="list_number">${todayRefundMap.sumAmout}</span>
            </p>
        </label>
        <label class="information_list">
            <p><span class="liabilitiesIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">权责收入</p>
            <p style="font-size: 30px;color: #fd8661;font-weight: 600">
                <span class="list_number">${todayResponsibilityMap.sumAmount}</span>
            </p>
        </label>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 margin-bottom-30 monthInformation hidden">
        <label class="information_list ">
            <p><span class="addMemberIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">新增亲子会员</p>
            <p style="font-size: 30px;color: #ff80a9;font-weight: 600">
                <#list monthStudentMap as data >
                    <#if data.type == 1>
                        <#if data.applyStatus == 0>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="addContinueIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">续报亲子会员</p>
            <p style="font-size: 30px;color: #ff80a9;font-weight: 600">
                <#list monthStudentMap as data >
                    <#if data.type == 1>
                        <#if data.applyStatus == 1>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="addTransitIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">新增过渡会员</p>
            <p style="font-size: 30px;color: #15a4fa;font-weight: 600">

                <#list monthStudentMap as data >
                    <#if data.type == 2>
                        <#if data.applyStatus == 0>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="continueTransitIcon"></span></p>
            <p style="font-size: px;color: #4a647d">续报过渡会员</p>
            <p style="font-size: 30px;color: #15a4fa;font-weight: 600">

                <#list monthStudentMap as data >
                    <#if data.type == 2>
                        <#if data.applyStatus == 1>
                            <span class="information_number">${(data.number???string(data.number?html,"0"))!'0'}</span>
                        </#if>
                    </#if>
                </#list>
            </p>
        </label>
        <label class="information_list">
            <p><span class="incomeIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">收付收入</p>
            <p style="font-size: 30px;color: #b393e7;font-weight: 600">
                <span class="information_number">${monthPaymentMap.sumAmount}</span>
            </p>
        </label>
        <label class="information_list">
            <p><span class="premiumIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">退费支出</p>
            <p style="font-size: 30px;color: #6cbd6d;font-weight: 600">
                <span class="list_number">${monthRefundMap.sumAmout}</span>
            </p>
        </label>
        <label class="information_list">
            <p><span class="liabilitiesIcon"></span></p>
            <p style="font-size: 16px;color: #4a647d">权责收入</p>
            <p style="font-size: 30px;color: #fd8661;font-weight: 600">
                <span class="list_number">${monthResponsibilityMap.sumAmount}</span>
            </p>
        </label>
    </div>

    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div style="margin-bottom: 50px;clear: both;">
            <div class="widget flat margin-top-0" style="margin: 0px 0 0px 0!important;float: left">
                <div class="widget-header bordered-sky theme-bordered nopadding">
                    <div class="widget-buttons widget-label nomargin-bottom">
                        <label class="businessBtns">
                            <a type="btn" class="btn nowinformationBtn" onclick="nowInformationChangeShow(this)"
                               value="1"
                               style="background-color: #23a8f5;border: none;border-top-left-radius: 4px!important;border-bottom-left-radius: 4px!important;width: 120px;color: #fff;margin-right: 0!important;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">
                                今日亲子考勤
                            </a><a type="btn" class="btn nowTransitionBtn" onclick="nowInformationChangeShow(this)"
                                   value="2"
                                   style="border: none;border-top-right-radius: 4px!important;border-bottom-right-radius: 4px!important;width: 120px;color: #4a647d;box-shadow:0px 0px 10px rgba(122,161,184,0.3);">今日过渡考勤
                            </a>
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 margin-bottom-30 kissBabyList">
        <label class="information_work-total" style="position:relative">
            <#list todayAttendanceStatisticsMap as data >
                <#if data.type == 1>
                    <div class="todayAttendanceStatisticsMap text-align-center" sumShouldAttendAttendance="${data.sumShouldAttendAttendance}" sumRealAttendance="${data.sumRealAttendance}">
                        <p style="font-size: 16px;color: #fff">应出勤：${data.sumShouldAttendAttendance}</p>
                        <p style="font-size: 16px;color: #fff">实出勤：${data.sumRealAttendance}</p>
                    </div>
                </#if>
            </#list>

            <div id="todayAttendanceStatisticsMap" style="min-width:400px;height:400px;background-color: #15a4fa"></div>
        </label>

        <#list parentingClassAttendanceMap as data>
           <!-- <#if data.type == 1>-->
                <label class="information_work" style="position:relative">
                    <p style="font-size: 16px;color: #4a647d">${data.startTime} - ${data.endTime}</p>
                    <p style="font-size: 16px;color: #4a647d">${data.className}</p>
                    <p style="font-size: 16px;color: #4a647d">${data.roomName}(<span class="proportion" color="${data.color}">${data.sumRealAttendance}/${data.sumShouldAttendAttendance}</span>)
                    </p>
                    <a type="button" class="btn btn-infoWork" onclick="classAttendance(this)" classType="1"
                       lessonsId="${data.lessonsId}"
                       style="position: absolute;left: 45px;top: 110px;z-index: 1;height: 30px;width: 110px">去考勤</a>
                    <div id="kisscontainer${data_index}" style="width:200px;height:200px"></div>
                </label>
            <!--</#if>-->
        </#list>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 margin-bottom-30 transitionList hidden">
        <label class="information_work-total" style="position:relative">

            <#list todayAttendanceStatisticsMap as data >
                <#if data.type == 2>
                    <div class="transitAttendanceStatisticsMap text-align-center" sumShouldAttendAttendance="${data.sumShouldAttendAttendance}" sumRealAttendance="${data.sumRealAttendance}">
                        <p style="font-size: 16px;color: #fff">应出勤：${data.sumShouldAttendAttendance}</p>
                        <p style="font-size: 16px;color: #fff">实出勤：${data.sumRealAttendance}</p>
                    </div>
                </#if>
            </#list>
            <div id="transitAttendanceStatisticsMap" style="min-width:400px;height:400px;background-color: #15a4fa"></div>
        </label>

        <#list transitionClassAttendanceMap as data>
            <!--<#if data.type == 2>-->
                <label class="information_work" style="position:relative">
                    <p style="font-size: 16px;color: #4a647d">${data.startTime} - ${data.endTime}</p>
                    <p style="font-size: 16px;color: #4a647d">${data.className}</p>
                    <p style="font-size: 16px;color: #4a647d">${data.roomName}(<span class="transitproportion" color="${data.color}" >${data.sumRealAttendance}/${data.sumShouldAttendAttendance}</span>)
                    </p>
                    <a type="button" class="btn btn-transitinfoWork" onclick="classAttendance(this)" classType="1"
                       lessonsId="${data.lessonsId}"
                       style="position: absolute;left: 45px;top: 110px;z-index: 1;height: 30px;width: 110px">去考勤</a>
                    <div id="transitcontainer${data_index}" style="width:200px;height:200px"></div>
                </label>
           <!-- </#if>-->
        </#list>
    </div>

</div>
<script>
    $(".selectpicker").select2();

    //    当天日期
    $(function () {
        var date = new Date();
        var month = date.getMonth() + 1;
        var day = date.getDate();
        var timeHtml = '(' + month + '-' + day + ')';
        $("#nowTimeMes").empty().append(timeHtml);
    })

    //    tab栏切换
    function nowInformationChangeShow(that) {
        var val =$(that).attr("value");
        if(val == 1){
            $(".kissBabyList").removeClass("hidden");
            $(".transitionList").addClass("hidden");
            $(".nowinformationBtn").css({
                "background-color": "#23a8f5",
                "color": "#fff"
            })
            $(".nowTransitionBtn").css({
                "background-color": "#fff",
                "color": "#4a647d"
            })
        }
        if(val == 2){
            $(".kissBabyList").addClass("hidden");
            $(".transitionList").removeClass("hidden");
            $(".nowTransitionBtn").css({
                "background-color": "#23a8f5",
                "color": "#fff"
            })
            $(".nowinformationBtn").css({
                "background-color": "#fff",
                "color": "#4a647d"
            })
        }
    }

    function informationChangeShow(that) {
        var val = $(that).attr("value");
        if (val == 0) {
            $(".monthInformation").addClass("hidden");
            $(".todayInformation").removeClass("hidden");
            $(".informationshow").css({
                "background-color": "#23a8f5",
                "color": "#fff"
            })
            $(".informationhidden").css({
                "background-color": "#fff",
                "color": "#4a647d"
            })

        }

        if (val == 1) {
            $(".todayInformation").addClass("hidden");
            $(".monthInformation").removeClass("hidden");
            $(".informationhidden").css({
                "background-color": "#23a8f5",
                "color": "#fff"
            })
            $(".informationshow").css({
                "background-color": "#fff",
                "color": "#4a647d"
            })
        }
    }


    // 今日亲子考勤画图
    var kissArr = [];
    if ($(".proportion").size()) {
        var kissArr = [];
        $(".proportion").each(function () {
            var obj = {};
            var all = $(this).html();
            var color =$(this).attr("color");
            obj.total = all.split("/")[1];
            obj.angle = all.split("/")[0];
            obj.color = color;
            kissArr.push(obj);
        })
    }
    //    循环画图
    for (var i = 0; i < kissArr.length; i++) {
        var obj = kissArr[i];
        var bl = Math.round((obj.angle / obj.total) * 100) + '%';
        var id = '#kisscontainer' + i;
        var sum = Number(obj.total) - Number(obj.angle);
        var chart = null;
        $(id).highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                width: 200,
                height: 200
            },
            title: {
                floating: true,
                text: bl
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                    },
                }
            },
            series: [{
                type: 'pie',
                innerSize: '80%',
                name: '人数',
                data: [
                    {
                        name: '实际缺勤',
                        y: sum,
                        color: '#D5DDE5'
                    },
                    {
                        name: '实际出勤',
                        y: Number(obj.angle),
                        color: obj.color
                    },
                ]
            }]
        }, function (c) {
            // 环形图圆心
            //            console.log(c.series[0])
            //            console.log(c.title.styles.fontSize)
            var centerY = c.series[0].center[1],
                titleHeight = parseInt(c.title.styles.fontSize);
            c.setTitle({
                y: centerY + titleHeight / 2
            });
            chart = c;
        });

        if (bl == "100%" || bl=="0%") {
            $(".kissBabyList .highcharts-series").eq(i).attr("transform","translate(-5,10) scale(1 1)")
        }

        $(".btn-infoWork").eq(i).css({
            "background": obj.color,
            "border-color": obj.color
        });
        $(".kissBabyList .highcharts-data-labels").remove();
    }

    //  今日亲子总考勤
    var ealAttendance = Number($(".todayAttendanceStatisticsMap").attr("sumShouldAttendAttendance"));
    var attendance = Number($(".todayAttendanceStatisticsMap").attr("sumRealAttendance"));
    var sum1= ealAttendance - attendance;
    var attendanceBl =Math.round((attendance / ealAttendance) * 100) + '%';
    $("#todayAttendanceStatisticsMap").highcharts({
        chart: {
            plotBackgroundColor: "#15a4fa",
            plotBorderWidth: null,
            plotShadow: false,
            width: 200,
            height: 200
        },
        title: {
            floating: true,
            text: attendanceBl
        },
        plotOptions: {
            pie: {
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                },
            }
        },
        series: [{
            type: 'pie',
            innerSize: '85%',
            name: '人数',
            data: [
                {
                    name: '总缺勤',
                    y: sum1 ,
                    color: '#D5DDE5'
                },
                {
                    name: '总出勤',
                    y: attendance,
                    color: '#fff'
                },
            ]
        }]
    }, function (c) {
        // 环形图圆心
        var centerY = c.series[0].center[1],
            titleHeight = parseInt(c.title.styles.fontSize);
        c.setTitle({
            y: 80,
            x: 0,
            style: {
                color: '#fff',
                fontWeight: 'bold'
            }
        });
        chart = c;
    });

    if (attendanceBl == "100%" || attendanceBl=="0%") {
        $("#todayAttendanceStatisticsMap .highcharts-series").attr("transform","translate(-44,-50) scale(1.5 1.5)");
    }else{
        $("#todayAttendanceStatisticsMap .highcharts-series").attr("transform","translate(-34,-50) scale(1.5 1.5)");
    }
    $("#todayAttendanceStatisticsMap .highcharts-data-labels").remove();
    $("#todayAttendanceStatisticsMap .highcharts-plot-background" ).attr("x",0);
    $("#todayAttendanceStatisticsMap .highcharts-plot-background" ).attr("y",0);
    $("#todayAttendanceStatisticsMap .highcharts-plot-background" ).attr("width",200);
    $("#todayAttendanceStatisticsMap .highcharts-plot-background" ).attr("height",200);




    // 今日过渡考勤画图
    var transitArr = [];
    if ($(".transitproportion").size()) {
        var transitArr = [];
        $(".transitproportion").each(function () {
            var obj = {};
            var all = $(this).html();
            var color =$(this).attr("color");
            obj.total = all.split("/")[1];
            obj.angle = all.split("/")[0];
            obj.color = color;
            transitArr.push(obj);
        })
    }
    //    循环画图
    for (var i = 0; i < transitArr.length; i++) {
        var obj = transitArr[i];
        var bl = Math.round((obj.angle / obj.total) * 100) + '%';
        var id = '#transitcontainer' + i;
        var sum = Number(obj.total) - Number(obj.angle);
        var chart = null;
        $(id).highcharts({
            chart: {
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                width: 200,
                height: 200
            },
            title: {
                floating: true,
                text: bl
            },
            plotOptions: {
                pie: {
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                    },
                }
            },
            series: [{
                type: 'pie',
                innerSize: '80%',
                name: '人数',
                data: [
                    {
                        name: '实际缺勤',
                        y: sum,
                        color: '#D5DDE5'
                    },
                    {
                        name: '实际出勤',
                        y: Number(obj.angle),
                        color: obj.color
                    },
                ]
            }]
        }, function (c) {
            // 环形图圆心
            //            console.log(c.series[0])
            //            console.log(c.title.styles.fontSize)
            var centerY = c.series[0].center[1],
                titleHeight = parseInt(c.title.styles.fontSize);
            c.setTitle({
                y: centerY + titleHeight / 2
            });
            chart = c;
        });

        if (bl == "100%" || bl=="0%") {
            $(".transitionList .highcharts-series").eq(i).attr("transform","translate(-5,10) scale(1 1)")
        }

        $(".btn-transitinfoWork").eq(i).css({
            "background": obj.color,
            "border-color": obj.color
        });
        $(".transitionList .highcharts-data-labels").remove();
    }

    // 今日过渡总考勤

    var ealAttendance1 = Number($(".transitAttendanceStatisticsMap").attr("sumShouldAttendAttendance"));
    var attendance1 = Number($(".transitAttendanceStatisticsMap").attr("sumRealAttendance"));
    var sum2= ealAttendance - attendance;
    var attendanceBl1 =Math.round((attendance1 / ealAttendance1) * 100) + '%';
    $("#transitAttendanceStatisticsMap").highcharts({
        chart: {
            plotBackgroundColor: "#15a4fa",
            plotBorderWidth: null,
            plotShadow: false,
            width: 200,
            height: 200
        },
        title: {
            floating: true,
            text: attendanceBl1
        },
        plotOptions: {
            pie: {
                cursor: 'pointer',
                dataLabels: {
                    enabled: true,
                    format: '<b>{point.name}</b>: {point.percentage:.1f} %',
                },
            }
        },
        series: [{
            type: 'pie',
            innerSize: '85%',
            name: '人数',
            data: [
                {
                    name: '总缺勤',
                    y: sum2 ,
                    color: '#D5DDE5'
                },
                {
                    name: '总出勤',
                    y: attendance1,
                    color: '#fff'
                },
            ]
        }]
    }, function (c) {
        // 环形图圆心
        var centerY = c.series[0].center[1],
            titleHeight = parseInt(c.title.styles.fontSize);
        c.setTitle({
            y: 80,
            x: 0,
            style: {
                color: '#fff',
                fontWeight: 'bold'
            }
        });
        chart = c;
    });
    $("#transitAttendanceStatisticsMap .highcharts-data-labels").remove();
    $("#transitAttendanceStatisticsMap .highcharts-plot-background" ).attr("x",0);
    $("#transitAttendanceStatisticsMap .highcharts-plot-background" ).attr("y",0);
    $("#transitAttendanceStatisticsMap .highcharts-plot-background" ).attr("width",200);
    $("#transitAttendanceStatisticsMap .highcharts-plot-background" ).attr("height",200);

    if (attendanceBl1 == "100%" || attendanceBl1=="0%") {
        $("#transitAttendanceStatisticsMap .highcharts-series").attr("transform","translate(-44,-50) scale(1.5 1.5)");
    }else{
        $("#transitAttendanceStatisticsMap .highcharts-series").attr("transform","translate(-34,-50) scale(1.5 1.5)");
    }


    /**
     * 班级考勤
     * @param that
     */
    function classAttendance(that) {
        var lessonsId = $(that).attr("lessonsId");
        var classType = $(that).attr("classType");
        var htmlTitle = "";
        if (classType == 1) {
            htmlTitle = "班级考勤(亲子)"
        }
        if (classType == 2) {
            htmlTitle = "班级考勤(过度)"
        }
        ajaxRequest("tssMemberCheckAttendanceController/tssMemberCheckAttendanceClass.do", {
            type: classType,
            lessonsId: lessonsId
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: htmlTitle,
                className: 'myDialog tssMemberCheckAttendanceDialog'
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")

    }

    /**
     * 备注修改
     * @param that
     */
    function Remarks() {
        ajaxRequest("TssFeedbackController/TssFeedback.do", {}, function (html) {
            getTopWin(html).bootbox.dialog({
                message: html,
                title: "意见反馈",
                className: 'myDialog tssMemberCheckDialog'
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")
    }

</script>

